import { getAction, deleteAction, putAction, postAction, httpAction } from '@/api/manage'
const gateway = '/gateway/api'
const jnby = '/jnby-boot'


//标签管理
const queryDim = (params) => postAction(gateway + '/admin/product/queryDim', params) // 查询分类、品牌等数据
const queryCatePermisListByDepart = (params) => getAction(jnby + '/sys/category/queryCatePermisListByDepart', params) // 查询当前登录用户所在部门的分类字典
const queryGoods = (params) => postAction(gateway + '/openapi/product/queryGoodSkc', params) // 查询商品
const goodsDetail = (params) => postAction(gateway + '/openapi/product/goodsSkcDetail', params) // 查询商品详情
const querySelCatePerByDepart = (params) => postAction('/sys/category/querySelectedCatePermisListByDepart', params) // 查询当前登录用户选中的分类字典
const markingLabel = (params) => postAction(gateway + '/openapi/product/markingLabel', params) // 商品打标签
const getAnalysisDataByKeys = (params) => getAction(gateway + '/openapi/product/getAnalysisDataByKeys', params) // 根据keys判断文件是否解析完毕
const querySysCateTree = (params) => getAction('/sys/category/querySysCateTree', params) // 查询字典类目树
const addProductCatePermission = (params) => postAction('/sys/category/addProductCatePermission', params) // 添加字典商品类目授权
const queryItemCateById = (params) => getAction('/sys/category/queryItemCateById', params) // 查询某个字典分类所属类目
const queryCatePermisListByIds = (params) => postAction('/sys/category/queryCatePermisListByIds', params) // 通过标签ID查询授权的类目树
const batchSysCateByIds = (params) => postAction('/sys/category/batchSysCateByIds', params) // 批量通过ID查询字典名称
const querySampleGoodSkc = (params) => postAction(gateway + '/openapi/product/querySampleGoodSkc', params) // 查询样衣商品SKC
const querySampleProductFilter = (params) => postAction(gateway + '/openapi/product/querySampleProductFilter', params) // 查询样衣商品筛选数据

export {
  queryDim,
  queryCatePermisListByDepart,
  queryGoods,
  goodsDetail,
  querySelCatePerByDepart,
  markingLabel,
  getAnalysisDataByKeys,
  querySysCateTree,
  addProductCatePermission,
  queryItemCateById,
  queryCatePermisListByIds,
  batchSysCateByIds,
  querySampleGoodSkc,
  querySampleProductFilter,
}

//获取版型库管理
let versionLib = '/api/gateway/jnby-product-center/product/version/lib'
export const versionLibEdit = (params) => postAction(versionLib + '/edit/detail', params) // 编辑详情
export const versionLibQueries = (params) => postAction(versionLib + '/queries', params) // 查询参数
export const versionLibQueryDetail = (params) => postAction(versionLib + '/query/detail', params) // 查询详情
export const versionLibQueryDetailDic = (params) => postAction(versionLib + '/query/detail/dic', params) //获取版型详情字典
export const versionLibQueryList = (params) => postAction(versionLib + '/query/list', params) // 查询列表
export const versionLibQuerySales = (params) => postAction(versionLib + '/query/sales', params) // 查询销量
export const versionLibQuerySalesQueries = (params) => postAction(versionLib + '/query/sales/queries', params) // 查询参数
// export const versionLibEdit = (params) => postAction(versionLib + '/edit/detail') // 编辑详情